import request from '@/utils/request'

export function submit(data) {
  return request({
    url: 'buss/budgetapproval/submit',
    method: 'post',
    data
  })
}

export function getOne(id) {
  return request.get('buss/budgetapproval/getOne?id='+id)
}

export function getTablePage(data) {
  return request.post('buss/budgetapproval/listPage', data)
}

export function del(ids) {
  return request({
    url: 'buss/budgetapproval/delete',
    method: 'post',
    data: ids
  })
}

export function resubmit(data) {
  return request({
    url: 'buss/budgetapproval/resubmit',
    method: 'post',
    data
  })
}

export function getBudgetApprovalTree(projectId) {
  return request.get('buss/budgetapproval/getBudgetApprovalTree?projectId='+projectId)
}

export function importExcel(data) {
  return request({
    url: 'buss/budgetapproval/importExcel',
    method: 'post',
    data
  })
}

export function addRoot(data) {
  return request({
    url: 'buss/budgetapproval/addRoot',
    method: 'post',
    data
  })
}

export function breakdownLedger(data) {
  return request.post('buss/budgetapproval/breakdownLedger', data)
}


export default {
  submit,
  getOne,
  del,
  resubmit,
  getTablePage,
  getBudgetApprovalTree,
  importExcel,
  addRoot,
  breakdownLedger
}
